<% 
DIRECTIVE SAFE_OUTPUT_OPEN;
var headContent = {
	include("/pages/template/head.html"){}
%>
<script type="text/javascript">
var oper = {
	save:function(id){
		if(!validForm()) {
			return false;
		}
		id = id || '0';
		var url = 'admin/nutrition/save/'+id;
		form1.action = url;
		form1.submit();
		return true;
	}	
};//js验证进行了封装，只需要添加valid和validname属性就可以实现js验证功能，提交时调用 validForm()方法即可。
</script>

<%
};
var bodyContent = {
%>
<form name="form1" action="" method="post" class="form-horizontal" role="form">
	<input type="hidden" name="model.id" value="${model.id}" />
	<table class="table">
		<% // 列表头部 %>
		<tr>
			<td>进餐模式</td>
			<td>
					<input class="form-control" type="text" name="model.type" value="${model.type}" 
						valid="vtext" validname="进餐模式"  />
			</td>
		</tr>
				<tr>
			<td>年龄段</td>
			<td>
					<input class="form-control" type="text" name="model.agen" value="${model.agen}"  />
			</td>
		</tr>
				<tr>
			<td>菜谱</td>
			<td>
					<input class="form-control" type="caiming" name="model.caiming" value="${model.caiming}"  />
			</td>
		</tr>
		<tr>
			<td>带量</td>
			<td>
					<input class="form-control" type="dailiang" name="model.dailiang" value="${model.dailiang}"  />
			</td>
		</tr>
	</table>
	
	<div style="height: 50px;clear: both;">&nbsp;</div>
	<nav class="navbar navbar-default navbar-fixed-bottom">
	  <div class="container" style="padding: 5px 0px 5px 0px;text-align: center;">
		<button class="btn btn-primary" onclick="oper.save(${model.id!'0'});return false;">保 存</button>
		<button class="btn btn-default" onclick="closeIframe();return false;">关 闭</button>
	  </div>
	</nav>
</form>
<%}; %>

<% layout("/pages/template/_layout.html",{head:headContent,body:bodyContent}){ %>
DIRECTIVE SAFE_OUTPUT_CLOSE;
<%} %>